import request from "../utils/request";
//模拟
/**
 *合约交易撤单
 * @param {
 * } params
 * @returns
 */
export function democancelOrderLever(id) {
  return request({
    url: `/v1/demo/orderLever/cancelOrder/${id}`,
    method: "GET",
  });
}

/**
 *合约交易订单平仓
 * @param {
 * } params
 * @returns
 */
export function democloseOrderLever(params) {
  return request({
    url: `/v1/demo/orderLever/close/${params.id}`,
    method: "GET",
  });
}

/**
 *合约交易订单详情
 * @param {
 * } params
 * @returns
 */
export function demoOrderLeverDetail(id) {
  return request({
    url: `/v1/demo/orderLever/details/${id}`,
    method: "GET",
  });
}

/**
 *
 * @returns 合约费率列表
 */
export function demoleverFeeList() {
  return request({
    url: "/v1/demo/orderLever/leverFeeList",
    method: "GET",
  });
}

/**
 *合约下单信息
 * @param {
 * } params
 * @returns
 */
export function demoleverInfo(params) {
  return request({
    url: `/v1/demo/orderLever/leverInfo/${params.currency_match_id}`,
    method: "GET",
  });
}

/**
 *合约交易下单
 * @param {
 * } data
 * @returns
 */
export function demoleverOrder(data) {
  return request({
    url: "/v1/demo/orderLever/leverOrder",
    method: "POST",
    data,
  });
}

/**
 *合约交易列表(当前持仓、当前委托、历史记录列表 状态区分)
 * @param {
 * } params
 * @returns
 */
export function demoleverPage(params) {
  return request({
    url: "/v1/demo/orderLever/leverPage",
    method: "GET",
    params,
  });
}

/**
 *开通合约账户
 * @param {
 * } params
 * @returns
 */
export function demoopenLever() {
  return request({
    url: "/v1/demo/orderLever/openLever",
    method: "GET",
  });
}

/**
 *设置止盈止损
 * @param {
 * } data
 * @returns
 */
export function demosetLeverProfit(data) {
  return request({
    url: "/v1/demo/orderLever/setLeverProfit",
    method: "POST",
    data,
  });
}

/**
 *币币交易撤单
 * @param {
 * } params
 * @returns
 */
export function democancelOrderTransaction(id) {
  return request({
    url: `/v1/demo/orderTransaction/cancelOrder/${id}`,
    method: "GET",
  });
}

/**
 *获取币币交易账户余额
 * @param {
 * } params
 * @returns
 */
export function demotransactionBalance(currency_match_id) {
  return request({
    url: `/v1/demo/orderTransaction/transactionBalance/` + currency_match_id,
    method: "GET",
  });
}

/**
 *币币交易下单
 * @param {
 * } data
 * @returns
 */
export function demotransactionOrder(data) {
  return request({
    url: "/v1/demo/orderTransaction/transactionOrder",
    method: "POST",
    data,
  });
}

/**
 *币币交易委托列表
 * @param {
 * } params
 * @returns
 */
export function demotransactionPage(params) {
  return request({
    url: "/v1/demo/orderTransaction/transactionPage",
    method: "GET",
    params,
  });
}
/**
 *币币交易订单详情
 * @param {
 * } params
 * @returns
 */
export function demotransactionDetail(id) {
  return request({
    url: `/v1/demo/orderTransaction/details/${id}`,
    method: "GET",
  });
}

/**
 *币币交易历史委托列表
 * @param {
 * } params
 * @returns
 */
export function demotransactionRecordPage(params) {
  return request({
    url: "/v1/demo/orderTransaction/transactionRecordPage",
    method: "GET",
    params,
  });
}

/**
 *秒合约合约下单信息
 * @param {
 * } params
 * @returns
 */
export function demoorderSecondLeverInfo(id) {
  return request({
    url: `/v1/demo/orderSecondLever/orderSecondLeverInfo/${id}`,
    method: "GET",
  });
}

/**
 *秒合约交易下单
 * @param {
 * } params
 * @returns
 */
export function demoorderSecondLever(data) {
  return request({
    url: `/v1/demo/orderSecondLever/orderSecondLever`,
    method: "POST",
    data,
  });
}

/**
 *秒合约交易订单列表
 * @param {
 * } params
 * @returns
 */
export function demosecondLeverPage(params) {
  return request({
    url: `/v1/demo/orderSecondLever/page`,
    method: "GET",
    params,
  });
}

/**
 *秒合约取消订单
 * @param {
 * } params
 * @returns
 */
export function democancelSecondOrder(id) {
  return request({
    url: `/v1/demo/orderSecondLever/cancelOrder/${id}`,
    method: "GET",
  });
}

/**
 *秒合约订单详情
 * @param {
 * } params
 * @returns
 */
export function demosecondOrderDetail(id) {
  return request({
    url: `/v1/demo/orderSecondLever/details/${id}`,
    method: "GET",
  });
}

/**
 *秒合约费率列表
 * @param {
 * } params
 * @returns
 */
export function demogetSecondHandlingFeeList() {
  return request({
    url: "/v1/demo/orderSecondLever/handlingFeeList",
    method: "GET",
  });
}

//股票交易撤单
export function demostockOrderCancelOrder(id) {
  return request({
    url: `/v1/demo/stockOrder/cancelOrder/${id}`,
    method: "GET",
  });
}
//股票下单
export function demostockOrderMakeOrder(data) {
  return request({
    url: "/v1/demo/stockOrder/makeOrder",
    method: "POST",
    data,
  });
}

//股票当前委托列表
export function demostockOrderPage(params) {
  return request({
    url: "/v1/demo/stockOrder/page",
    method: "GET",
    params: params,
  });
}

//股票当前持仓列表
export function demostockOrderPageHold(params) {
  return request({
    url: "/v1/demo/stockOrder/pageHold",
    method: "GET",
    params: params,
  });
}

//股票交易记录列表
export function demostockOrderRecordPage(params) {
  return request({
    url: "/v1/demo/stockOrderRecord/page",
    method: "GET",
    params,
  });
}

/**
 *股票合约交易撤单
 * @returns
 */
export function demostockOrderLeverCancelOrder(id) {
  return request({
    url: `/v1/demo/stockOrderLever/cancelOrder/${id}`,
    method: "GET",
  });
}
/**
 *股票合约交易订单平仓
 * @returns
 */
export function demostockOrderLeverClose(id) {
  return request({
    url: `/v1/demo/stockOrderLever/close/${id}`,
    method: "GET",
  });
}
/**
 *股票合约交易订单详情
 * @returns
 */
export function demostockOrderLeverDetails(id) {
  return request({
    url: `/v1/demo/stockOrderLever/details/${id}`,
    method: "GET",
  });
}
/**
 *股票合约费率列表
 * @returns
 */
export function demostockOrderLeverFeeList() {
  return request({
    url: `/v1/demo/stockOrderLever/leverFeeList`,
    method: "GET",
  });
}
/**
 *股票合约下单信息
 * @returns
 */
export function demostockOrderLeverInfo(stock_id) {
  return request({
    url: `/v1/demo/stockOrderLever/leverInfo/${stock_id}`,
    method: "GET",
  });
}
/**
 * 股票合约交易下单
 * @param {*} data
 * @returns
 */
export function demostockOrderLeverMakeOrder(data) {
  return request({
    url: "/v1/demo/stockOrderLever/leverOrder",
    method: "POST",
    data,
  });
}
/**
 * 股票合约交易列表(当前持仓、当前委托、历史记录列表 状态区分)
 * @param {*} params
 * @returns
 */
export function demostockOrderLeverOrderPage(params) {
  return request({
    url: "/v1/demo/stockOrderLever/leverPage",
    method: "GET",
    params: params,
  });
}
/**
 *开通股票合约账户
 * @param {
 * } params
 * @returns
 */
export function demostockOrderLeverOpenLever() {
  return request({
    url: "/v1/demo/stockOrderLever/openLever",
    method: "GET",
  });
}
/**
 *股票合约设置止盈止损
 * @param {
 * } data
 * @returns
 */
export function demostockOrderLeverSetLeverProfit(data) {
  return request({
    url: "/v1/demo/stockOrderLever/setLeverProfit",
    method: "POST",
    data,
  });
}

//股票账户余额
export function demostockBalance(id) {
  return request({
    url: `/v1/demo/stock/stockBalance/${id}`,
    method: "GET",
  });
}

/**
 *股票秒合约取消订单
 * @returns
 */
export function demoStockOrderSecondLeverCancelOrder(id) {
  return request({
    url: `/v1/demo/StockOrderSecondLever/cancelOrder/${id}`,
    method: "GET",
  });
}
/**
 *股票秒合约详情
 * @returns
 */
export function demoStockOrderSecondLeverDetails(id) {
  return request({
    url: `/v1/demo/StockOrderSecondLever/details/${id}`,
    method: "GET",
  });
}
/**
 *股票秒合约费率列表
 * @returns
 */
export function demoStockOrderSecondLeverFeeList() {
  return request({
    url: `/v1/demo/StockOrderSecondLever/handlingFeeList`,
    method: "GET",
  });
}
/**
 *股票秒合约下单信息
 * @returns
 */
export function demoStockOrderSecondLeverInfo(stock_id) {
  return request({
    url: `/v1/demo/StockOrderSecondLever/orderSecondLeverInfo/${stock_id}`,
    method: "GET",
  });
}
/**
 * 股票秒合约交易下单
 * @param {*} data
 * @returns
 */
export function demoStockOrderSecondLeverMakeOrder(data) {
  return request({
    url: "/v1/demo/StockOrderSecondLever/orderSecondLever",
    method: "POST",
    data,
  });
}
/**
 * 股票秒合约交易列表(订单状态(1-当前委托，2-当前持仓，3-交易记录))
 * @param {*} params
 * @returns
 */
export function demoStockOrderSecondLeverOrderPage(params) {
  return request({
    url: "/v1/demo/StockOrderSecondLever/page",
    method: "GET",
    params: params,
  });
}

/**
 *账户明细列表
 * @param {
 * } params
 * @returns
 */
export function demouserAssetsPage(params) {
  return request({
    url: "/v1/demo/userAssets/page",
    method: "GET",
    params,
  });
}

/**
 *划转记录
 * @param {
 * } params
 * @returns
 */
export function demotransferRecord(params) {
  return request({
    url: "/v1/demo/userAssets/transferRecord",
    method: "GET",
    params,
  });
}

/**
 * 我的资产
 * @param {*} data
 * @returns
 */
export function demouserAssetsInfo() {
  return request({
    url: "/v1/demo/userAssets/userAssetsInfo",
    method: "POST",
  });
}

/**
 *财务记录类型
 * @param {
 * } params
 * @returns
 */
export function demofinancialRecordType(params) {
  return request({
    url: "/v1/demo/userAssets/financialRecordType",
    method: "GET",
    params,
  });
}

/**
 *财务记录列表
 * @param {
 * } params
 * @returns
 */
export function demouserRecordFinancialPage(params) {
  return request({
    url: "/v1/demo/userAssets/userRecordFinancialPage",
    method: "GET",
    params,
  });
}

/**
 *钱包类型
 * @param {
 * } params
 * @returns
 */
export function demouserAssetsWalletType(params) {
  return request({
    url: "/v1/demo/userAssets/walletType",
    method: "GET",
    params,
  });
}
